Electronic computer with program debugging facility



Dec. 10, 1968 ELECTRONIC COMPUTER WITH PROGRAM DEBUGGING FACILITY Original Filed Dec. 11, 1963 4 Sheets-Sheet 1 34 /B0 400/? c 1c, lc [c n I P REGIsTER z A REG/sTER 35 V 3 5 REGISTER E23 4 a REGIsTER I 2 9 P' GENERAL f .7 A GENERAL 536 055005" II STA'GENERAL l I 5' GENERAL I c! A P" REAL TIME B A R AL TIM E E L37 5! 6 STA REAL TIME x 0 8" REAL TIME J T; TIMING GENE COMPUTER J JUMP P" GENERAL }36 CONTROLS z JUMPP REAL TIME }37 I 51 oEcRE- W X MEMORY REGISTER 44 MENT 4 DECODER ii I 1+ 1 A 2 28 3 BUS i GATEs J N: ADDER 1 o 30 ,ao No B] I I I5 I ggg E sg :j INTERCHANGE 24 3 3 i i 1 I 3 i I I 60 C1 C2 C3 MEMORY REGISTER Q DE 1 I 26 27 Up N A0 A, A2 A3 Bo BI 52 B3 25 d (1 d2 d3 d4 d5 d d7 d d9 HSM HIGH SPEED INVENTORS MEMORY JAMEs F CALLAHAN I'A RICHARD DSMITH ATTORNEY 10, 1968 R. D. SMITH ETAL 3,415,931

ELECTRONIC COMPUTER WITH PROGRAM DEBUGGING FACILITY Qriginal Filed Dec. 11, 1963 4 Sheets-Sheet 2 COMPARATOR 76 PRIORITY SEL. Y

INDICATOR A IDENTIFIER a o o N! N2 123T456123I456723T456 or 02 03 04 0s 06 07 0a 0910 II I2 I3 I4 15 I6 17 Ia INVENTORS JAMES F CALLAHAN ATTORNEY Dec. 10, 1968 0. SMITH ETAL 3,415,981

ELECTRONIC COMPUTER WITH PROGRAM DEBUGGING FACILITY Original Filed Dec. 11, 1963 4 Sheets-Sheet 5 B0 rF? r8? /B3 M as Y 9! SET INPUTS FROM INSTRUCTIONS AND HARDWARE INTERR PT IN I ATORS 9 SRSR U M 5R Illllllllllllllllllll llllllllllllll 01 02 03 04 O5 06 07 08 09 10 H 12 I3 74 15 16 I7 18 V v vvivvv1vvvvvv$r1r $1 n 51 X x N; n N, 9 N0 T 6 M R R I00\ 29' I 51 No i Y M W W SI 0 $1 R W E4- x T To T8 T8 T8 SI Y JUMP TO INTERRUPT ROUTINE AND Y 51 INSTRUCTION Z x INVENTORS f JAMES E CALLAHAN 5. I-C RICHARD D. SMITH BY $4! ATTORNEY Dec. 10, 1968 R. D. SMITH ETAL ELECTRONIC COMPUTER WITH PROGRAM DEBUGGING FACILITY Driginal Filed Dec. 11. 1963 4 Sheets-Sheet A /B0 /F1 13 za:

C 3 KEY TO SYMBOLS:

62 /64 SIX-BIT CHARACTER LOCATION DECODER OEcOOER L l; C: AND" GATE 5: P1 O1 J 1 REMOVE I 0 SET 1 REMOVE 1, 0R GATE 8 SET PROGRAM TEST A REMOVE PROGRAM TEST TPROGRAMMED INTERRUPT 'NVERTER PI C1 C1 c1 C1 C1 c1 7 i A J 1 o T T 1 T r r T 126 I36 I38 no 5 R 5 132 5 R FF FF FF -14o 5 I34 T In 5 KEY TO F/auREs:

18 [-76- FIG. FIG. FIG. I-A I-B I-C 1-0 INVENTORS JAMES E CALLAHAN R/OHARO 0. SMITH ATTORNEY United States Patent 3,415,981 ELECTRONIC COMPUTER WITH PROGRAM DEBUGGING FACILITY Richard D. Smith, Moorestown, and James F. Callahan, Willingboro, N..I., assignors to Radio Corporation of America, a corporation of Delaware Continuation of application Ser. No. 329,638, Dec. 11, 1963. This application Oct. 10, 1967, Ser. No. 674,350 2 Claims. (Cl. 235153) ABSTRACT OF THE DISCLOSURE A computer with an interrupt facility including means for testing a program to find errors in the program. The interrupt facility is constructed to permit the programmer to insert a program test" instruction in the normal-mode program to cause a setting of a program test indicator. Execution of the normal-mode program is then interrupted after each instruction therein, at which time the computer does a programmed subroutine designed to detect an error or errors in the normal-mode program.

This application is a continuation of application Ser. No. 329,638 filed on Dec. 11, 1963.

This invention relates to electronic computers capable of temporarily interrupting a program being performed for the performance of a program of higher urgency.

It is the main object of the invention to provide a computer having an improved interrupt facility by means of which the computer can be used by the programmer to test or debug a program to locate errors in the program.

According to an example of the invention, there are provided a plurality of interrupt indicators each of which is set upon the occurrence of a respective request for interruption originating as the result of a condition in the computer, or as the result of the decoding of an instruction in the program being performed. The set condition of any interrupt indicator causes the program being performed to be interrupted at an interruptable point for the execution of a scan interrupt indicators instruction. The scan interrupt indicators instruction includes the address of a mask indicating the ones of the interrupt indicators which the programmer will permit to cause an interruption. The means for execution of the scan interrupt indicators instruction identifies the highest priority interrupt indicator which is set and not masked and causes the computer to access a peculiar correspond ing memory location where the programmer has previously stored a peculiar corresponding subroutine to be followed. Any particular interrupt subroutine may be changed at any time by merely changing the contents of a corresponding memory location.

The interrupt facility is constructed to permit the programmer to insert a program test" instruction in the normal-mode program to cause the setting of a program test signal which sets a particular corresponding one of the interrupt indicators, which in turn causes an interruption following performance of every normal-mode instruction for the performance of a particular desired program-testing or program-debugging subroutine. A remove program test instruction at a later point in the program removes the program test signal and discontinues the testing procedure.

In the drawing:

FIGS. 1A, 1B, 1C and 1D taken together comprise a schematic diagram of a computer having an interrupt facility.

Description of computer FIG. 1D includes a key to the connected relationship 3,4 l 5,98 l Patented Dec. 10, l 968 of FIGS. 1A through 1D, and includes a key to the symbols used in FIGS. 1A through 1D.

Reference is now made to FIG. 1A for a description of an illustrative computer having an interrupt facility. The computer, which is character organized, includes a high speed memory HSM for the storage of ten-character instructions and ten-character data words. Each character includes six binary bits, not counting a parity bit which will be ignored in the description. The instruction format ilustrated in memory HSM includes an operation code character Op, an operation option character N, four A address characters A A A and A and four B address characters B B B and B A data word. as illustrated, includes ten six-bit data characters d through Instruction words and data Words may be transferred, one at a time, between the memory HSM and a memory register 20. One, two, three or four characters may be transferred at a time through an interchange 22 to a respective one or ones of four six-conductor busses B0, B1, B2 and B3.

Any one character storage location in the high speed memory HSM may be addressed by four six-bit characters C C C and C in an address register 24. The characters C C and C are directed over line 25 to memory HSM to access a complete instruction word or data word. The character C in the address register 24 (and other control signals) are applied over line 26 to the interchange 22 to select from one to four characters for transfer between the memory register and the busses B0 through B3. The lines 26 and from the address register 24 are also connected over line 27 to a bus adder 28 from which an incremented or decremented address may be directed through gate 30 to the busses B0 through B3. The interchange 22 operates under the control of gates including the gate 32.

Address register 24 receives four-character addresses via busses B0 through B3 from a current address register labeled P register located in a scratch pad memory 34. The scratch pad memory 34 includes a number of fourcharacter storage locations used as registers. The storage locations 35 are used as registers for the current operating condition of the computer. The storage locations 36 are used as registers for storing the status of the computer when there is an interruption for a cause having a priority or urgency designated general. The storage locations 37 are used as registers for storing the status of the computer when there is an interruption for a cause having a priority or urgency designated real-time."

Any one of the four-character storage locations or registers in the scratch pad memory 34 may be addressed by a single six-bit character. An address register 40 contains the six-bit character currently used for addressing the scratch pad memory 34. The contents of the address register 40 determines which one of the four-character storage locations in scratch pad memory 34 is selected for the transfer of characters between the scratch pad memory 34 and the busses B0 through B3 via a memory register 44 and gates 46.

The addresses supplied to the scratch pad memory address register 40 are generated by an address generator 48 in response to inputs from a number of gates. The gates include gates designated P, A and B which control the generation of addresses for the respectively-designated registers P, A and B.

The control of the sequence of events in the computer is effected by the usual timing generator and computer control unit 50. The unit 50 receives inputs from all portions of the computer, and provides outputs to all portions of the computer. Some of the elements included in the unit 50 which are particularly involved in the interrupt facility of the computer are shown in FIG. 1C and designated 50'. Specific elements included, which will 3 be referred to at a later point in the description are designated 51 through 59.

When the computer fetches an instruction from the high speed memory HSM for execution, the portions of the instruction are transferred via the main busses to respective staticizing registers. During a first portion of the staticizing cycle, operation code character Op is transferred to the staticizing register Op, the content of which is decoded by an operation decoder 62. Three of the many outputs of the decoder 62 are shown and designated SI, CI and PI. The instruction option N of the instruction is transferred to a register N, the content of which is decoded by a decoder 64. Some of the many outputs of decoder 64 are shown and designated N N N N N and and A. The content of the staticizing register N may be decremented by a signal from a gate 65.

During a second portion of the instruction staticizing procedure, the A address portion of the instruction is transferred to the A register in the scratch pad memory 34. During a third portion of the staticizing procedure, the B address portion of the instruction is transferred to the B register in the scratch pad memory 34.

The main busses B0 through B3 continue from FIG. 1A through FIGS. 1B, 1C and 1D. In FIG. 1B the sixconductor bus B2 is connected through a corresponding number of gates 68 to a data register D in the arithmetic unit of the computer. Similarly, the six-conductor bus B3 is connected through a corresponding number of gates 69 to a data register D in the arithmetic unit.

Description of interrupt facility The individual bit outputs of the data registers D and D are connected to six respective bit comparators 70. Each one of the bit comparators 70 has an individual output lead in the group 72 which carries a signal indicating whether or not a match exists between the two bits supplied to it.

The outputs 72 of the comparator 70 are connected through an or gate 74 and a gate 75 to provide an output M which is energized when a match is found. An inverter 79 has an output H which is energized when no match is found. The outputs 72 of the comparator 70 are also applied to a priority selector 76 having numbered output lines connected to correspondingly-numbered in puts of eighteen gates in an interrupt indicator identifier circuit 80. If a match is found between more than one of the six hits, the priority selector 76 energizes only the highest priority one of its corresponding outputs at any particular time. The priority selector may be conventional and may include a gate for each set of input and output lines, and inhibiting connections from the input of each gate to the inputs of all gates associated with lower pri ority sets of input and output lines.

The operation of the eighteen gates in the indicator identifier 80 are controlled by a gate 77. The numbered outputs of the indicator identifier circuit 80 are connected over an eighteen-conductor line 81 to inputs of an indicator number coder or generator 82. The outputs 01 and 11 from identifier 80 are connected to input labeled 1 of gate 2 in coder 82. The same scheme is followed in connecting outputs 02 and 12 through 07 and 17 from identifier 80 to inputs labeled 2 through 7, respectively, of gates 2 2 and 2 in decoder 82. Decoder 82 translates the indicator number represented by energization of one of the eighteen numbered outputs of the identifier 80 into a corresponding indicator number expressed as two sixbit numeric decimal digits. The two digits are supplied to respective character registers C and C (The character registers C; and C may be omitted. They are shown in the drawing to suggest that the number they contain consists of two binary-coded decimal digits.) The six outputs of character register C; are connected through six gates designated 83 to the six respective conductors of bus B1. Similarly, the six outputs of character register C are connected through six gates 84 to the six conductors of bus B2.

The eighteen-conductor output line 81 of the indicator identifier 80, is also connected through a reset line 85 to FIG. 1C of the drawing to gate 86 and thence to the reset inputs R of eighteen interrupt indicator flip-flops 90. The eighteen interrupt indicators 90 also have individual set inputs to which set signals may be applied over an eighteen-conductor line 91 from eighteen respective sources of requests for interruption of the program being performed. The sources supplying requests for interruption may be circuits responding to respective conditions in the computer, or conditions in the peripheral devices associated with the computer, or may be circuits responding to the decoding of instructions calling for interruption of the program being performed.

The eighteen numbered interrupt indicators 90 are divided into two groups according to priority or urgency- The first five interrupt indicators are indicators of requests for interruption having a priority or urgency des ignated real-time. These five outputs are connected through five gates 93 having a common output providing a signal R for real-time requests for interruption. The gates 93 may be blocked by an inverted inhibit signal I from interrupt routine unit 53 (FIG. 1C). The other thirteen interrupt indicators 06 through 18 correspond with causes of interruption having a lower priority designated general." The outputs of these thirteen interrupt indicators are connected through thirteen gates 97 having a common output R for requests for interruption having a general priority, The gates 97 may be locked by an inverted inhibit signal i from unit 53 or by an inverted inhibit signal I from unit 53. The eighteen numbered interrupt indicators 90 are also divided into three groups of six indicators each in accordance with the six-bit character organization of the computer. T outputs of the first six interrupt indicators 01 through 06 are connected via six gates 94 to an or gate 95. The outputs of the next six indicators 07 through 12 are connected through six gates 98 to or gate 95. And the outputs of the last six indicators 13 through 18 are connected through six gates 99 to or gate 95. The output of or" gate is connected over a six-conductor line 100 to the respective six conductors of main bus B2.

Description of interrupt controls The interrupt facility includes inhibit means operative during an interruption to prevent a second interruption for a cause of equal or lesser priority. An inhibit signal on output I; is generated by the unit 53 (FIG. 1C) whenever the computer has entered into a general interrupt routine. The inhibit output I is connected through inverter 96 to gate 97. The unit 53 also has an inhibit signal output I connected through inverter 92 to gate 93, and through inverter 96 to gate 97.

Reference is now made to FIG. 1D where the operation and option registers Op and N shown in FIG. 1A are repeated. The decoders 62 and 64 are also repeated, but the decoder 64 in FIG. 1D is shown to provide additional outputs not indicated on the same decoder 64 as represented in FIG. 1A.

When the instruction staticized in the registers Op and N is an instruction calling for the setting of a programcontrolled interrupt indicator (indicator 06 in the present example), the decoded PI and T signals from decoders 62 and 64 cause an enabling of a gate (FIG. 1D) having an output overconductor 91 to set input S of the interrupt indicator 06 (shown in FIG. 1D) in the group of interrupt indicators 90 shown in FIG. 1C. The conductor 91' is one of the eighteen conductors of the line 91 (FIG. 1C).

Program-controlled means are provided for generating and removing inhibit signals which inhibit or prevent the computer from interrupting the program being performed even though a request for interruption is present and is evidenced by the set condition of an interrupt indicator in the group 90. The control interrupt signal line CI from the decoder 62 (FIG. 1D) and the and 1 signal lines from the decoder 64 are connected through gates 130 and 132 to the set and reset inputs, respectively, of the flipfiop 134 to respectively establish and remove a signal I; for use in inhibiting interruptions having a general" priority or urgency. Similarly, the 0 and signal lines from decoder 64 (FIG. ID) are connected through gates 136 and 138 to flip-flop 140 to respectively establish and remove an inhibit signal I used for inhibiting causes of interruption in both the real-time and general categories.

An instruction called Set Program Test is decoded by decoder 62 and decoder 64 to energize outputs CI and which are connected through a gate 124 to the set input of a flip-flop 123 having an output connected to a gate 128. An output conductor 91" from the gate 128 is one of the eighteen conductors of the set line 91 in FIG. 1C and it is the conductor connected to the set input of the interrupt indicator 18 (FIG. 1C) which is allocated to the purpose of program testing. The gate 128 also has an output W connected to gate 51 (FIG. 1C).

Another instruction option Remove Program Test, when decoded, results in the energization of the inputs CI and A of gate 126. The output of gate 132 is connected to the reset input of flip-flop 123.

Operation during interruption The operation of the. computer proceeds cycle-by-cycle in a synchronous manner. The computer control (FIG. 1A) includes a timing generator which generates timing pulses T through T The operation of the computer before, during and after an interruption will be described by references to successive machine cycles designated V, W, X, Y and Z.

V cycle It is assumed that the V cycle is one during which the computer is executing an instruction in its normal-mode program. The instruction is one following which the program can be interrupted, as evidenced by the generation of a signal W by the computer control 50 (FIG. 1A). It is assumed that a request for interruption has been made as the result of the occurrence of a condition in the system, or as the result of the decoding of a staticized instruction which called for an interruption. The request for interruption is directed over one conductor of the eighteen conductor line 91 (FIG. 1C) to the corresponding one of the eighteen interrupt indicators 90. The request for interruption causes the setting of the respective interrupt indicator.

The interrupt hardware is capable of being inhibited to prevent interruption at the option of the programmer. Interruption takes place only in the absence of an inhibit signal 1 or I,- from unit 53. When any one of the indicators is set, and interruption is not inhibited in gate 93 or 97 (FIG. 1C) by a previously generated inhibit signal, a request for interruption signal R or R is generated by gate 93 or 97. If the set indicator is a real-time indicator, the gate 93 generates a request for interruption signal R,., and if the set indicator is a general indicator, the gate 97 generates a request for interruption signal R The previously-mentioned signal W generated in control unit 50 during the V cycle is used to enable the next following W cycle or cycles.

W cycle During the W cycle (which actually involves a number of machine cycles), the interrupt signal R or R is applied to gate 51 or 52 (FIG. 1C) to generate a jump signal J or I The jump signal is used by computer control unit 53 to cause an interruption of the program being performed and an entrance into the interrupt program. This is accomplished by transposing the contents of the registers in the scratch pad memory 34 by means including the gate P (FIG. 1A). The contents of the registers 35 containing the normal mode state of the computer are transferred to the general interrupt registers 36 or the real-time interrupt registers 37, depending on whether the request for interruption arose out of a general or a real-time cause.

The contents of the Jump P general register or the Jump P real-time register is transferred to the P register, which is the instruction register used for the address of the current instruction executed by the machine. The Jump P general or Jump P real-time register contained the address of the location in the high speed memory of the first instruction in the interrupt routine. This instruction, now being in the P or instruction register, causes the fetching and staticizing of the first instruction in the general or real-time interrupt routine.

The first, or an early, instruction in the interrupt routine, is the instruction SI calling for the scanning of the interrupt indicators. The staticizing of the instruction in the high speed memory involves transferring the operation code character to the Op register (FIG. 1A), and transferring the operation option character N to the staticizing register N. The Op decoder 62 decodes the contents of the register Op and energizes the line SI; and the N de coder 64 decodes the contents of the staticizing register N and energizes an appropriate one of the output lines NO, in, N N2 and N3.

The procedure of staticizing the SI instruction also includes the transferring of the A address portion and the B address portion of the instruction to the A register and the B register, respectively, of the scratch pad memory 34 (FIG. 1A). The A address portion of the instruction includes a character A predetermined by the programrner, characters A; and A each set equal to zero, and A, which may be predetermined by the programmer. The contents of the A register, as later modified during execution of the SI instruction, is the address in memory HSM of the particular subrouting to be followed. The B address portion of the instruction is predetermined by the programmer and is the address in memory HSM of the first interrupt indicator mask to be used.

Signals SI, W and timing pulse T produce the generation through gates 54 and 55 (FIG. 1C) of an X signal for enabling the following X cycle.

X cycle The previously-generated SI and X signals together with timing pulse signals, are used to perform the following transfers: At time T the gate B (FIG. 1A) is enabled and directs an output to the address generator 48 which generates the address 4 of the B register in the scratch pad memory 34 and applies it to the address register 40 of the scratch pad memory 34. Then, the contents of the B register is applied through gates 46 and the main busses B0, B1, B2 and B3 to the address register 24 of the high speed memory HSM where it is used to address the memory HSM to read out a mask character (and nine other unneeded characters) into the memory register 20.

At time T the contents of the address register 24 is incremented by the bus adder 28 and passed by gate 30 to the main busses. At the same time T the gate B is enabled so that the B register in the scratch pad memory 34 is addressed to receive the incremented address from the main busses. Also, at the same time T the gate 65 supplies a decrementing signal to the staticizing register N.

At time T the gate 32 enable-s the interchange 22 to direct the mask character in the memory register 20 to the main bus B3. The mask character on the main bus B3 is directed by gate 69 (FIG. 1B) to the data register D At time T one of the gates 94, 98, 99 (FIG. 1C) is enabled to direct a group of interrupt indicator bits through or gate 95, bus B2 and gate 68 (FIG. IE) to the data register D The particular group of interrupt indicator bits which are thus transferred is determined by the energized one of the outputs N N N from the N decoder (FIG. 1A).

At time T, the gate 57 (FIG. 1C) generates a signal Y for enabling the next cycle of operation.

Y cycle The six indicator bits of the character in the data register D (FIG. 1B) and the six mask bits of the character in the data register D are respectively and simul' taneously compared in a multiple-bit comparator 70 having six outputs 72. If a match is found, the corresponding output conductor is energized. The six outputs are applied to a priority selector 76 having outputs 1 through 6, only the highest priority one of which is energized if more than one of the bit positions match. The outputs of the comparator 70 are also applied through an or" gate 74 and a gate 75 which provides, during the Y cycle, a match signal M if a match existed, or at the output of inverter 79, a no-match signal if if no match existest-priority one of the interrupt indicators which was found to be set. The output of the indicator identifier 80 is applied over eighteen-conductor line 81 to the indicator number coder or generator 82 and results in the generation in symbolic character registers C and C of two six-bit characters representing the two decimal digits of the indicator number. The binary-coded decimal character in register C represents either a or a l. The binary-coded decimal character in register C' represents one of the decimal digits 0 through 9.

At time T the gates 83 and 84 (FIG. 1B) pass the indicator number characters (3' and (Y through busses B1 and B2, respectively, to the middle character positions C and C of the four characters in the A register (FIG. 1A) in the scratch pad memory 34.

At time T if a match signal M exists, the energized one of the outputs of the indicator identifier 80 (FIG. 1B) is applied over one conductor of line 81 and a corresponding one conductor of reset line 85 and through one of the gates 86 (FIG. 1C) to reset the corresponding one of the interrupt indicators 90.

At time T either a signal X or a signal Z is generated by means (FIG. 1C). If the output of the N decoder in FIG. 1A is N and if the output of the comparator 70 in FIG. 1B indicates the lack of a match by the signal if, these signals applied to the gate 56 cause the generation of a signal X from or gate 55. On the other hand, if an N signal or an M signal is present at the input of or" gate 58, the gate is enabled to cause the generation of a Z signal from the gate 59.

X cycle or 2 cycle If the X signal was generated during the preceding Y cycle, the steps in the previously-described X and Y cycles are repeated until a Z signal results. The X and Y cycles are repeated three times if the programmed instruction SI included an option N equal to 3 and herein designated N In this case all eighteen interrupt indicators are scanned. Similarly, if N was N the X and Y cycles are repeated twice to scan indicators 07 through 12. And, if U was N the X and Y cycles are performed once to scan indicators 13 through 18. Thereafter the signal Z is generated.

If the Z signal was generated during the preceding Y cycle, the Z signal is interpreted and used by computer control 50 (FIG. 1A) to cause a transfer of the contents of the A register in the scratch pad memory 34 to the current instruction register P in the scratch pad memory.

(Alternatively, the contents of the A register may be transferred to and stored in a so-called STA location in high speed memory HSM. Then, a transfer of control instruction, which may follow the scan interrupt indicator instruction in the program, causes the former contents of the A register to be transferred from the STA" location in memory HSM to the P register. This alternative arrangement gives the programmer further control over the interrupt hardware and also serves to eliminate additional hardware otherwise needed to make automatic the transfer of the contents of the A register to the P register.)

The contents of the A register, now in the P or in struction register, is the address in the high speed memory HSM of the first instruction of a subroutine predetermined by the programmer as one to be followed upon the detection of a request for interruption from the corresponding particular one of the interrupt indicators, or it is the address in high speed memory of the subroutine to be followed in the event that there was no looked-for (unmasked) request for interruption.

By way of review, the initial scan interrupt instruction SI included a four-character A address portion which was transferred to the A register. The four characters are A predetermined by the programmer, A and A each set equal to zero, and A;, which may be predetermined by the programmer. If, during the execution of the SI instruction, an unmasked and set interrupt indicator is found, the number of the interrupt indicator is placed in the positions A and A of the A register. The contents of the A register then contain the address in the high speed memory HSM of the first instruction of a subroutine to be followed after detection of the particular course of interruption. The particular subroutine and others were previously stored in memory HSM by the programmer at locations having addresses identified by programmed characters A and A and by indicator-identifying characters A; and A I execution of the scan interrupt instruction SI did not result in the finding of a set and unmasked interrupt in dicator, the two middle characters A; and A in the A register are still zeros. The characters A A A and A in the A register then represent the address in memory HSM of the first instruction to be followed in the event that no request for interruption is found. This first instruction may be an instruction causing the computer to jump back to its normal mode program.

lnterruptiont by programmed instruction The interrupt procedure which has been described is always initiated (if not inhibited) by the setting of one of the eighteen interrupt indicators 90. Most of the interrupt indicators are set automatically when some predetermined condition occurs in the hardware of the computer. Such occurrences may, for example, be a request from the console, an arithmetic error, an arithmetic overflow, a busy or unoperable peripheral device or a normal or abnormal termination of a simultaneous mode of operation. In addition, one of the interrupt indicators is assigned to be controlled by the programmer, rather than by the operation of the hardware of the computer.

The interrupt indicator designated 06 in the present example is reserved for programmed interruptions. The interrupt indicator 06 is set as the result of the decoding of an instruction written by the programmer and inserted in a program being performed.

When a programmed interrupt instruction is staticized by the computer, the PI output of the Op decoder 62 rupt indicators 90 (FIG. 1C). When the interrupt indicator 06 is set, the interrupt routine, which has been described, including the scan interrupt indicator instruction SI, is entered into. The computer scans the interrupt indicators, identifies indicator 06 as the one which is set, and then enters into the particular subroutine which the programmer Wishes to be followed.

Interruption priorities The program interruption procedure which has been described may be prevented or inhibited by the presence of inhibit signals I or I at the inverter inputs (FIG. 1C) of gates 93 and 97. The various conditions under which the inhibit signals I, and I, are generated will now be described.

The interrupt hardware in the computer prevents or inhibits the interruption of an interrupt routine or subroutine on the occurrence of a second request for interruption due to a cause of equal or lower priority. When the program being performed is interrupted, as has been described by the application of a jump signal I or J,- to the unit 53 (FIG. 1C), the program being performed is interrupted, and the computer jumps to the performance of the interrupt routine which includes the scan interrupt indicator instruction SI. When this happens, the unit 53 generates appropriate signals for the control of the com puter, and also generates an appropriate one of the inhibit signals I or 1,. If the interrupt routine entered into is a general interrupt routine, the inhibit signal I is generated and applied through the inverter 96 at the input of gate 97. This input blocks an output R from the gate 97 so that the gate 51 is disabled and cannot cause an interruption of the general interrupt routine or subroutine being performed.

However, the general interrupt routine or subroutine being performed can itself be interrupted for the performance of a higher priority real-time" request for interruption. Such a real-time request R,. from gate 93 enables gate 52 and causes a jump signal 1,. The signal I, supplied to the unit 53 causes the computer to interrupt the general interrupt routine or subroutine and jump to the real-time interrupt routine.

Whenever unit 53 causes the computer to jump to the performance of the real-time routine and subroutine, the unit 53 also provides an inhibit output I which is applied through the inverters 92 and 96' to both of gates 93 and 97 to prevent interruption of the real-time" routine or subroutine by a real-time request for interruption or by a general request for interruption.

To summarize, a normal-mode program may be interrupted by either a general or real-time request for interruption. A general interrupt routine or subroutine can be interrupted only by a real-time request for interruption. A reaHime interrupt routine or subroutine cannot be interrupted.

Programmed inhibition of interruption The programmer can prevent or inhibit interruption of any portion of a program by including instructions in the program which determine the point from which interruptions are not permitted and which determine the latter point from which interruptions are again permitted. The instructions can inhibit either general or real-time interruptions at the programmers option.

A set general inhibit instruction when decoded results in a signal SI from decoder 62 (FIG. 1D) and a signal from decoder 64. These signals applied to gate 130 cause a setting of the flip-flop 134 and a generation of a general inhibit signal I which is applied to gate 97 (FIG. 1C) to prevent the interruption of the program being performed for any general cause. A remove general inhibit" instruction results in decoded signals CI and 1 which act through gate 132 to reset the flip-flop 134 and remove the inhibit signal I Similarly, a set real-time inhibit instruction results in 10 decoded signals CI and I] which enable gate 136 to set flip-flop 140 and generate the real-time inhibit signal I,. A following remove real-time inhibit instruction results in decoded signals CI and which enable gate 138 to reset flip-flop 140 and terminate the real-time inhibit signal I Program testing or debugging A description will now be given of the operation of means by which the computer may be used to locate errors in a program supplied to, and being executed by, the computer. It is a common experience to find that a long and complex program includes some error which results in an obviously erroneous final result. For example, it may be found that the information stored in a particular memory location has been incorrectly changed at some unknown point during the execution of the program. It is then a very long and laborious process to study the program which was written to determine the point at which an erroneous instruction caused the undesired change in the contents of the memory location. The computer itself is used to find the error in the program by means of hardware designed to respond to an instruction called set program test mode."

The set program test mode instruction results in decoded signals CI and from decoders 62 and 64 (FIG. 1D) which are applied to enable gate 124 and set the flip-flop 123. The output of flip-flop 123 is applied through gate 128 at appropriate times T to generate a signal W and to generate a signal which sets the program test interrupt indicator 18 in the group of interrupt indicators (FIG. 1C). The signal W from gate 128 and the signal R from gate 97 (FIG 1C) enable the gate 51 and causes the unit 53 to jump from the normal-mode program being performed at the end of every one of the normal-mode instructions therein.

The computer then goes into the general interrupt routine, which has been described, to identify the interrupt indicator 18 as the one which is set, and to enter into a programmed subroutine designed by the programmer to find the point in the program at which the error occurs. The subroutine may be one during which a comparison is made between the previous contents of the disturbed memory location and the present contents of the memory location. The subroutine may also include the use of the results of the comparison to print out or otherwise identify the point in the program where the disturbance of the contents of the memory location occurred.

The performance of the interrupt routine and the test program mode subroutine results in a resetting of the interrupt indicator 18. However, information retained in flipflop 123 causes the indicator to be again set during performance of the following normal-mode instruction. Once the flip-flop 123 has been set, as described, the computer performs the program test interrupt procedure after each normal-mode instruction. This program testing procedure can be made to cease at any point in the normal-mode program by inserting therein a remove program test instruction. This instruction, when decoded, enables gate 126 which resets the flip-flop 123 and discontinues further performance of the program testing interrupt procedure.

Summary The interrupt facility described is one characterized in that: (1) The programmer can determine by the number given to the character N in the scan interrupt indicators instruction whether one, two or all three of the groups of interrupt indicators should be scanned. (2) The programmer can determine by the B address in the scan interrupt indicators instruction which interrupt indicators in each group should be permitted to cause an interruption. (3) The programmer can insert an instruction which sets the interrupt indicator 06 and causes the interruption of the program being performed for the performance of an interrupt subroutine desired by the programmer. (4) The programmer can insert instructions which inhibit interruption for any general" or any real-time cause. (5) The programmer can insert an instruction which causes interruption after all normal mode instructions for the purpose of testing or debugging the program.

In general, the interrupt facility is one wherein the course followed by the computer is under the control of the programmer without the usual limitations imposed by fixed and predetermined hardward connections.

What is claimed is:

1. In an electronic computer having a memory; a decoder for decoding instructions read from the memory; a plurality of interrupt indicators capable of being set in response to the occurrence of respective interrupt conditions; and an interrupt system responding to the set condition of an interrupt indicator to cause the computer to interrupt performance of its normal mode program, to identify the interrupt condition, to reset the interrupt indicator, and to jump to the performance of a stored subroutine appropriate to the respective interrupt condition, the improvement comprising an additional program test" interrupt indicator,

a program test storage device capable of being set and reset,

means in said decoder for recognizing a program test mode instruction and for setting said program test storage device, and

means coupling the set condition of said program test storage device to said program test interrupt indicator to cause the setting of said indicator, whereby said interrupt system recognizes the set condition of the program test" interrupt indicator, resets the interrupt indicator, and causes the computer to jump to the performance of a stored subroutine which examines a condition in the computer and determines 5 whether it was changed during execution of the last normal-mode instruction, said program test storage device remaining in the set condition to cause repeated setting of said interrupt indicator and repeated interruptions following execution of subsequent normal-mode instructions.

2. The combination as defined in claim 1 and, in addition, means in said decoder for recognizing a remove program test instruction and for resetting said program test storage device.

,- References Cited UNITED STATES PATENTS 3,048,332 8/1962 Brooks et al. 20 3,286,239 11/1966 Thompson et al.

OTHER REFERENCES MALCOLM A. MORRISON, Primary Examiner.

C. E. ATKINSON, Assistant Examiner.

U.S. Cl. X.R. 

